package corba.airlineServer;


/**
* corba/corba.airlineServer/_ServerImplBase.java .
* ��IDL-to-Java ������ (����ֲ), �汾 "3.2"���
* ��AirlineServant.idl
* 2014��4��27�� ������ ����01ʱ56��06�� CST
*/

public abstract class _ServerImplBase extends org.omg.CORBA.portable.ObjectImpl
                implements corba.airlineServer.Server, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors
  public _ServerImplBase ()
  {
  }

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("queryCity2", new java.lang.Integer (0));
    _methods.put ("queryFlights2", new java.lang.Integer (1));
    _methods.put ("book2", new java.lang.Integer (2));
    _methods.put ("queryRates2", new java.lang.Integer (3));
    _methods.put ("queryAirline2", new java.lang.Integer (4));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {
       case 0:  // corba/corba.airlineServer/Server/queryCity2
       {
         String $result[] = null;
         $result = this.queryCity2 ();
         out = $rh.createReply();
         corba.airlineServer.citylistHelper.write (out, $result);
         break;
       }

       case 1:  // corba/corba.airlineServer/Server/queryFlights2
       {
         String deptString = in.read_string ();
         String destString = in.read_string ();
         String deptDateString = in.read_string ();
         String returnDateString = in.read_string ();
         corba.airlineServer.Flight $result[] = null;
         $result = this.queryFlights2 (deptString, destString, deptDateString, returnDateString);
         out = $rh.createReply();
         corba.airlineServer.flightsHelper.write (out, $result);
         break;
       }

       case 2:  // corba/corba.airlineServer/Server/book2
       {
         String flightNoString1 = in.read_string ();
         String deptString = in.read_string ();
         String classString1 = in.read_string ();
         String flightNoString2 = in.read_string ();
         String returnString = in.read_string ();
         String classString2 = in.read_string ();
         String nameString = in.read_string ();
         String creditString = in.read_string ();
         String $result = null;
         $result = this.book2 (flightNoString1, deptString, classString1, flightNoString2, returnString, classString2, nameString, creditString);
         out = $rh.createReply();
         out.write_string ($result);
         break;
       }

       case 3:  // corba/corba.airlineServer/Server/queryRates2
       {
         String flightString = in.read_string ();
         String classString = in.read_string ();
         String $result = null;
         $result = this.queryRates2 (flightString, classString);
         out = $rh.createReply();
         out.write_string ($result);
         break;
       }

       case 4:  // corba/corba.airlineServer/Server/queryAirline2
       {
         String deptString = in.read_string ();
         String dsctString = in.read_string ();
         String $result = null;
         $result = this.queryAirline2 (deptString, dsctString);
         out = $rh.createReply();
         out.write_string ($result);
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:corba/corba.airlineServer/Server:1.0"};

  public String[] _ids ()
  {
    return (String[])__ids.clone ();
  }


} // class _ServerImplBase
